<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMedicalAdviceExecutionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('medical_advice_executions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('inpatient_number')->comment('住院号');
            $table->integer('department_id')->comment('科室');
            $table->string('doctor_number')->comment('医嘱序号');
            $table->string('patient')->comment('病人姓名');
            $table->string('doctor_name')->comment('医嘱名称');
            $table->string('doctor_type')->comment('医嘱类型');
            $table->string('frequency')->comment('频率');
            $table->string('mode')->comment('方式');
            $table->timestamp('start_at')->comment('开始时间');
            $table->timestamp('end_at')->comment('结束时间');
            $table->timestamp('execution_time')->comment('执行时间');
            $table->string('examine')->comment('审核');
            $table->string('medicament_dose')->comment('药剂剂量');
            $table->string('pharmaceutical_unit')->comment('药剂单位');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('medical_advice_executions');
    }
}
